#pragma once 

#include <string>

class Message;
class Backend;
class BreakPointFile;

class BreakPointService {
public:
  BreakPointService();

  BreakPointService(Backend * backend, const std::string & fileName);

  ~BreakPointService();

  int start() ;
  int getBreakpoint() ;

  //maybe need to exception test 
  int sendMessage(const Message & msg);

  int connected();
  int disconnected();

  int receiveNormalResponse(const Message & msg);
  int receiveLoginResponse(const Message & loginMsg);

  int stop();

private:
  int _seqNo;
  Backend * _backend;
  BreakPointFile * _file;
};

void test_breakpoint_service() ;
void test_breakpoint_service__fileMode();
